package com.baike.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author author
 * @since 2021-10-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_lesson")
@ApiModel(value="TbLesson对象", description="")
public class TbLesson implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "雪花id")
    @TableId
    private Long lessonId;

    @ApiModelProperty(value = "课程名称")
    private String lessonName;

    @ApiModelProperty(value = "课程简介")
    private String lessonIntroduce;

    @ApiModelProperty(value = "课程一级分类")
    @TableField("lesson_categories_1")
    private Integer lessonCategories1;

    @ApiModelProperty(value = "课程二级分类")
    @TableField("lesson_categories_2")
    private Integer lessonCategories2;

    @ApiModelProperty(value = "课程图片")
    private String lessonImage;

    @ApiModelProperty(value = "发布教师")
    private Integer lessonTeacherId;

    @ApiModelProperty(value = "上传时间")
    private Date lessonPublishDate;

    @ApiModelProperty(value = "审核状态(0.待审核,1审核通过,2.审核未通过,3.已下架)")
    private Integer lessonStatus;

    @ApiModelProperty(value = "删除(0,未删除,1已删除)")
    private Integer lessonDelete;

    @ApiModelProperty(value = "0.免费,1.收费")
    private Integer lessonFree;

    @ApiModelProperty(value = "收费课程价格")
    private Double lessonPrice;

    @ApiModelProperty(value = "已售量")
    private String lessonCount;

    @ApiModelProperty(value = "课程目标")
    private String lessonGoal;

    @ApiModelProperty(value = "课程标签名称")
    private String lessonLabelName;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbLesson lesson = (TbLesson) o;
        return Objects.equals(lessonId, lesson.lessonId) && Objects.equals(lessonName, lesson.lessonName) && Objects.equals(lessonIntroduce, lesson.lessonIntroduce) && Objects.equals(lessonCategories1, lesson.lessonCategories1) && Objects.equals(lessonCategories2, lesson.lessonCategories2) && Objects.equals(lessonImage, lesson.lessonImage) && Objects.equals(lessonTeacherId, lesson.lessonTeacherId) && Objects.equals(lessonPublishDate, lesson.lessonPublishDate) && Objects.equals(lessonStatus, lesson.lessonStatus) && Objects.equals(lessonDelete, lesson.lessonDelete) && Objects.equals(lessonFree, lesson.lessonFree) && Objects.equals(lessonPrice, lesson.lessonPrice) && Objects.equals(lessonCount, lesson.lessonCount) && Objects.equals(lessonGoal, lesson.lessonGoal) && Objects.equals(lessonLabelName, lesson.lessonLabelName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(lessonId, lessonName, lessonIntroduce, lessonCategories1, lessonCategories2, lessonImage, lessonTeacherId, lessonPublishDate, lessonStatus, lessonDelete, lessonFree, lessonPrice, lessonCount, lessonGoal, lessonLabelName);
    }
}
